/*
* Copyright 2025 NXP
* NXP Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "lvgl.h"
#include <stdio.h>
#include "gui_guider.h"
#include "events_init.h"
#include "widgets_init.h"
#include "custom.h"



void setup_scr_page_alerm(lv_ui *ui)
{
    //Write codes page_alerm
    ui->page_alerm = lv_obj_create(NULL);
    lv_obj_set_size(ui->page_alerm, 480, 480);
    lv_obj_set_scrollbar_mode(ui->page_alerm, LV_SCROLLBAR_MODE_OFF);

    //Write style for page_alerm, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_bg_opa(ui->page_alerm, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->page_alerm, lv_color_hex(0x152029), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->page_alerm, LV_GRAD_DIR_VER, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_color(ui->page_alerm, lv_color_hex(0x152029), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_main_stop(ui->page_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_stop(ui->page_alerm, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes page_alerm_cont_2
    ui->page_alerm_cont_2 = lv_obj_create(ui->page_alerm);
    lv_obj_set_pos(ui->page_alerm_cont_2, 0, 0);
    lv_obj_set_size(ui->page_alerm_cont_2, 480, 45);
    lv_obj_set_scrollbar_mode(ui->page_alerm_cont_2, LV_SCROLLBAR_MODE_OFF);

    //Write style for page_alerm_cont_2, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_border_width(ui->page_alerm_cont_2, 2, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_opa(ui->page_alerm_cont_2, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_color(ui->page_alerm_cont_2, lv_color_hex(0x2195f6), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_border_side(ui->page_alerm_cont_2, LV_BORDER_SIDE_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->page_alerm_cont_2, 19, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_color(ui->page_alerm_cont_2, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_grad_dir(ui->page_alerm_cont_2, LV_GRAD_DIR_NONE, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->page_alerm_cont_2, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes page_alerm_a_back
    ui->page_alerm_a_back = lv_image_create(ui->page_alerm_cont_2);
    lv_obj_set_pos(ui->page_alerm_a_back, 14, 8);
    lv_obj_set_size(ui->page_alerm_a_back, 30, 30);
    lv_obj_add_flag(ui->page_alerm_a_back, LV_OBJ_FLAG_CLICKABLE);
    lv_image_set_src(ui->page_alerm_a_back, &_back_RGB565A8_30x30);
    lv_image_set_pivot(ui->page_alerm_a_back, 50,50);
    lv_image_set_rotation(ui->page_alerm_a_back, 0);

    //Write style for page_alerm_a_back, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_image_recolor_opa(ui->page_alerm_a_back, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_image_opa(ui->page_alerm_a_back, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes page_alerm_label_alerm
    ui->page_alerm_label_alerm = lv_label_create(ui->page_alerm_cont_2);
    lv_obj_set_pos(ui->page_alerm_label_alerm, 216, 16);
    lv_obj_set_size(ui->page_alerm_label_alerm, 48, 16);
    lv_label_set_text(ui->page_alerm_label_alerm, "闹钟");
    lv_label_set_long_mode(ui->page_alerm_label_alerm, LV_LABEL_LONG_WRAP);

    //Write style for page_alerm_label_alerm, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_border_width(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_radius(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_color(ui->page_alerm_label_alerm, lv_color_hex(0xffffff), LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_font(ui->page_alerm_label_alerm, &lv_font_SourceHanSerifSC_Regular_16, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_opa(ui->page_alerm_label_alerm, 255, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_letter_space(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_line_space(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_text_align(ui->page_alerm_label_alerm, LV_TEXT_ALIGN_CENTER, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_top(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_right(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_bottom(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_pad_left(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_shadow_width(ui->page_alerm_label_alerm, 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes page_alerm_alerm_add
    ui->page_alerm_alerm_add = lv_image_create(ui->page_alerm_cont_2);
    lv_obj_set_pos(ui->page_alerm_alerm_add, 431, 5);
    lv_obj_set_size(ui->page_alerm_alerm_add, 35, 35);
    lv_obj_add_flag(ui->page_alerm_alerm_add, LV_OBJ_FLAG_CLICKABLE);
    lv_image_set_src(ui->page_alerm_alerm_add, &_add_RGB565A8_35x35);
    lv_image_set_pivot(ui->page_alerm_alerm_add, 50,50);
    lv_image_set_rotation(ui->page_alerm_alerm_add, 0);

    //Write style for page_alerm_alerm_add, Part: LV_PART_MAIN, State: LV_STATE_DEFAULT.
    lv_obj_set_style_image_recolor_opa(ui->page_alerm_alerm_add, 0, LV_PART_MAIN|LV_STATE_DEFAULT);
    lv_obj_set_style_image_opa(ui->page_alerm_alerm_add, 255, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write codes page_alerm_list_1
    ui->page_alerm_list_1 = lv_list_create(ui->page_alerm);
    lv_obj_set_pos(ui->page_alerm_list_1, 0, 45);
    lv_obj_set_size(ui->page_alerm_list_1, 480, 435);
    lv_obj_set_scrollbar_mode(ui->page_alerm_list_1, LV_SCROLLBAR_MODE_OFF);
    ui->page_alerm_list_1_item0 = lv_list_add_button(ui->page_alerm_list_1, LV_SYMBOL_IMAGE, "save");

    //Write style state: LV_STATE_DEFAULT for &style_page_alerm_list_1_main_main_default
    static lv_style_t style_page_alerm_list_1_main_main_default;
    ui_init_style(&style_page_alerm_list_1_main_main_default);

    lv_style_set_pad_top(&style_page_alerm_list_1_main_main_default, 5);
    lv_style_set_pad_left(&style_page_alerm_list_1_main_main_default, 5);
    lv_style_set_pad_right(&style_page_alerm_list_1_main_main_default, 5);
    lv_style_set_pad_bottom(&style_page_alerm_list_1_main_main_default, 5);
    lv_style_set_bg_opa(&style_page_alerm_list_1_main_main_default, 255);
    lv_style_set_bg_color(&style_page_alerm_list_1_main_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_page_alerm_list_1_main_main_default, LV_GRAD_DIR_NONE);
    lv_style_set_border_width(&style_page_alerm_list_1_main_main_default, 1);
    lv_style_set_border_opa(&style_page_alerm_list_1_main_main_default, 255);
    lv_style_set_border_color(&style_page_alerm_list_1_main_main_default, lv_color_hex(0xe1e6ee));
    lv_style_set_border_side(&style_page_alerm_list_1_main_main_default, LV_BORDER_SIDE_FULL);
    lv_style_set_radius(&style_page_alerm_list_1_main_main_default, 3);
    lv_style_set_shadow_width(&style_page_alerm_list_1_main_main_default, 0);
    lv_obj_add_style(ui->page_alerm_list_1, &style_page_alerm_list_1_main_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_page_alerm_list_1_main_scrollbar_default
    static lv_style_t style_page_alerm_list_1_main_scrollbar_default;
    ui_init_style(&style_page_alerm_list_1_main_scrollbar_default);

    lv_style_set_radius(&style_page_alerm_list_1_main_scrollbar_default, 3);
    lv_style_set_bg_opa(&style_page_alerm_list_1_main_scrollbar_default, 255);
    lv_style_set_bg_color(&style_page_alerm_list_1_main_scrollbar_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_page_alerm_list_1_main_scrollbar_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(ui->page_alerm_list_1, &style_page_alerm_list_1_main_scrollbar_default, LV_PART_SCROLLBAR|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_page_alerm_list_1_extra_btns_main_default
    static lv_style_t style_page_alerm_list_1_extra_btns_main_default;
    ui_init_style(&style_page_alerm_list_1_extra_btns_main_default);

    lv_style_set_pad_top(&style_page_alerm_list_1_extra_btns_main_default, 5);
    lv_style_set_pad_left(&style_page_alerm_list_1_extra_btns_main_default, 5);
    lv_style_set_pad_right(&style_page_alerm_list_1_extra_btns_main_default, 5);
    lv_style_set_pad_bottom(&style_page_alerm_list_1_extra_btns_main_default, 5);
    lv_style_set_border_width(&style_page_alerm_list_1_extra_btns_main_default, 0);
    lv_style_set_text_color(&style_page_alerm_list_1_extra_btns_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_page_alerm_list_1_extra_btns_main_default, &lv_font_montserratMedium_12);
    lv_style_set_text_opa(&style_page_alerm_list_1_extra_btns_main_default, 255);
    lv_style_set_radius(&style_page_alerm_list_1_extra_btns_main_default, 3);
    lv_style_set_bg_opa(&style_page_alerm_list_1_extra_btns_main_default, 255);
    lv_style_set_bg_color(&style_page_alerm_list_1_extra_btns_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_page_alerm_list_1_extra_btns_main_default, LV_GRAD_DIR_NONE);
    lv_obj_add_style(ui->page_alerm_list_1_item0, &style_page_alerm_list_1_extra_btns_main_default, LV_PART_MAIN|LV_STATE_DEFAULT);

    //Write style state: LV_STATE_DEFAULT for &style_page_alerm_list_1_extra_texts_main_default
    static lv_style_t style_page_alerm_list_1_extra_texts_main_default;
    ui_init_style(&style_page_alerm_list_1_extra_texts_main_default);

    lv_style_set_pad_top(&style_page_alerm_list_1_extra_texts_main_default, 5);
    lv_style_set_pad_left(&style_page_alerm_list_1_extra_texts_main_default, 5);
    lv_style_set_pad_right(&style_page_alerm_list_1_extra_texts_main_default, 5);
    lv_style_set_pad_bottom(&style_page_alerm_list_1_extra_texts_main_default, 5);
    lv_style_set_border_width(&style_page_alerm_list_1_extra_texts_main_default, 0);
    lv_style_set_text_color(&style_page_alerm_list_1_extra_texts_main_default, lv_color_hex(0x0D3055));
    lv_style_set_text_font(&style_page_alerm_list_1_extra_texts_main_default, &lv_font_montserratMedium_12);
    lv_style_set_text_opa(&style_page_alerm_list_1_extra_texts_main_default, 255);
    lv_style_set_radius(&style_page_alerm_list_1_extra_texts_main_default, 3);
    lv_style_set_transform_width(&style_page_alerm_list_1_extra_texts_main_default, 0);
    lv_style_set_bg_opa(&style_page_alerm_list_1_extra_texts_main_default, 255);
    lv_style_set_bg_color(&style_page_alerm_list_1_extra_texts_main_default, lv_color_hex(0xffffff));
    lv_style_set_bg_grad_dir(&style_page_alerm_list_1_extra_texts_main_default, LV_GRAD_DIR_NONE);

    //The custom code of page_alerm.


    //Update current screen layout.
    lv_obj_update_layout(ui->page_alerm);

    //Init events for screen.
    events_init_page_alerm(ui);
}
